From: Zeeshan Ali (Khattak) Date: Sat, 15 Feb 2014 15:46:07 +0000 (+0000) Subject: location: Don't show menu if geoclue is totally incapable X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~2786 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=9217f2c91682d9ce2d25a175e1e0c197adce0756;p=gnome-shell.git location: Don't show menu if geoclue is totally incapable If geoclue can't provide location at all (no GPS or network), don't bother to show controls that don't serve any purpose. https://bugzilla.gnome.org/show_bug.cgi?id=723684 --- diff --git a/js/ui/status/location.js b/js/ui/status/location.js index d83aaf675..7f68b366b 100644 --- a/js/ui/status/location.js +++ b/js/ui/status/location.js @@ -127,6 +127,7 @@ const Indicator = new Lang.Class({ if (!this._availableAccuracyLevel) { this._availableAccuracyLevel = this._proxy.AvailableAccuracyLevel; this._maxAccuracyLevel = this._availableAccuracyLevel; + this._updateMenuVisibility(); } this._syncIndicator(); @@ -183,6 +184,10 @@ const Indicator = new Lang.Class({ var variant = new GLib.Variant('u', this._maxAccuracyLevel); this._agent.emit_property_changed ('MaxAccuracyLevel', variant); this._userSetAccuracy = false; + }, + + _updateMenuVisibility: function() { + this.menu.actor.visible = (this._availableAccuracyLevel != 0); } });